
#ifndef __BACK_GROUND_SCROLLER_H__
#define __BACK_GROUND_SCROLLER_H__

struct sBackGroundScrollerDesc
{
	sBackGroundScrollerDesc()
	{
		parent = NULL;
		speed = 0.0f;
	}

	CCNode* parent;
	tFilename spriteName;
	tFloat speed;
};

class cBackGroundScroller
{
public:
	cBackGroundScroller();
	~cBackGroundScroller();

	void Init(const sBackGroundScrollerDesc& desc);
	void Update(tFloat dt);

private:
	CCSpriteBatchNode* m_batchNode;
	CCSprite* m_sprite1;
	CCSprite* m_sprite2;

	CCSize m_textureSize;

	sBackGroundScrollerDesc m_desc;

	tFloat m_xPosition1;
	tFloat m_xPosition2;
};

#endif